<include file="public@header" />
</head>
<body>
<div class="wrap js-check-wrap">
    <include file="taxi/nav" />
    <form class="well search-form form-inline margin-top-20" method="get" action="{:url('taxi/index')}">
        <dcradio list="statuses" name="status" class="btn list-status m-r-5" value="$status" />
        <input type="text" class="form-control w-300" name="keyword" value="{:input('request.keyword/s','')}" placeholder="请输入 订单号 / 司机名 / 乘客名">
        <input type="submit" class="btn btn-primary" value="搜索" />
    </form>

    <form action="" class="js-ajax-form" method="post">
        <div class="table-actions">
            <!--<button class="btn btn-primary btn-sm js-ajax-submit" type="submit">{:lang('SORT')}</button>-->
        </div>
        <table class="table table-hover table-bordered">
            <thead>
            <tr>
                <th width="100">订单号</th>
                <th width="100">乘客 / 手机号</th>
                <th>人数</th>
                <th>起点</th>
                <th>终点</th>
                <th width="120">出发时间</th>
                <th>司机 / 手机号</th>
                <th>车牌号</th>
                <th width="120">最后操作时间</th>
                <th width="120">完成时间</th>
                <th width="120">创建时间</th>
                <th>操作</th>
            </tr>
            </thead>
            <tbody>
            <foreach name="list" item="vo">
                <tr>
                    <td>{$vo.order_no}</td>
                    <td>
                        {$vo.user_name} <br>
                        {$vo.user_mobile}
                    </td>
                    <td>{$vo.num}</td>
                    <td>
                        {$vo.start}<br>
                        <em class="fa fa-map-marker popup-url"
                            data-url="//uri.amap.com/navigation?from={$vo.start_longitude},{$vo.start_latitude},{$vo.start}&to={$vo.end_longitude},{$vo.end_latitude},{$vo.end}&mode=car&policy=1&src=mypage&coordinate=gaode&callnative=0"
                            data-width="900"
                        > 定位</em>
                    </td>
                    <td>
                        {$vo.end}<br>
                        <em class="fa fa-map-marker popup-url"
                            data-url="//uri.amap.com/navigation?from={$vo.start_longitude},{$vo.start_latitude},{$vo.start}&to={$vo.end_longitude},{$vo.end_latitude},{$vo.end}&mode=car&policy=1&src=mypage&coordinate=gaode&callnative=0"
                            data-width="900"
                        > 定位</em>
                    </td>
                    <td>{$vo.start_time}</td>
                    <td>{$vo.driver_name} <br> {$vo.driver_mobile}</td>
                    <td>
                        {$vo.car_no}<br>
                        <notempty name="vo.car_no">
                            <em class="fa fa-map-marker popup-url"
                                data-url="//uri.amap.com/navigation?from={$vo.start_longitude},{$vo.start_latitude},{$vo.start}&to={$vo.end_longitude},{$vo.end_latitude},{$vo.end}&mode=car&policy=1&src=mypage&coordinate=gaode&callnative=0"
                                data-width="900"
                            > 定位</em>
                        </notempty>
                    </td>
                    <td>{$vo.update_time|time_format="Y-m-d H:i",###}</td>
                    <td>{$vo.finished_time|time_format="Y-m-d H:i",###}</td>
                    <td>{$vo.create_time|time_format="Y-m-d H:i",###}</td>
                    <td>
                        <eq name="vo.status" value="1">
                            <a class="popup-url m-r-5" href="javascript:void(0);" data-url="{:url('taxi/chooseDriver', ['order_no' => $vo.order_no])}" data-title="运单派车 - {$vo.order_no}">派车</a>
                        </eq>
                        <if condition="$vo.status == 1 || $vo.status == 2">
                            <a class="js-ajax-send m-r-5" href="javascript:void(0);" data-url="{:url('taxi/cancel', ['order_no' => $vo.order_no])}" data-confirm="是否确定取消运单 - {$vo.order_no}">取消</a>
                        </if>
                        <if condition="$vo.status == 2">
                            <a class="js-ajax-send" href="javascript:void(0);" data-url="{:url('taxi/finish', ['order_no' => $vo.order_no])}" data-confirm="是否确定完成运单 - {$vo.order_no}">完成</a>
                        </if>
                    </td>
                </tr>
            </foreach>
            </tbody>
        </table>
    </form>
    <div class="pagination">{$page}</div>
</div>
<script src="__STATIC__/js/admin.js"></script>
<script>
    $('.list-status').click(function () {
        setTimeout(function () {
            $('.search-form').submit();
        }, 100);
    });
</script>
</body>
</html>